import React from 'react'
import classnames from 'classnames'
import PropTypes from 'prop-types'
export default function Icon({ type, className,onClick }) {
    return (
        <svg className={classnames('icon', className)}
            onClick={onClick}
            aria-hidden="true">
            <use xlinkHref={`#${type}`}></use>
        </svg>
    )
}
Icon.propTypes = {
    type: PropTypes.string.isRequired
}